package com.coffeeloversupportlibrary.coffeelover.uicompont;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.viewpager.widget.ViewPager;

/**
 * @author puyv
 * @createTime 2021/11/6 19:53
 * @projectName CoffeeLoverSupportLibrary
 * @className NoScrollerPage.java
 * @description TODO
 */
public class NoScrollPage extends ViewPager {
    public NoScrollPage(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public NoScrollPage(Context context) {
        super(context);
    }

    @Override
    public boolean onTouchEvent(MotionEvent arg0) {
        return false;
    }

    /**
     * 不拦截事件
     */
    @Override
    public boolean onInterceptTouchEvent(MotionEvent arg0) {
        return false;
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        return super.dispatchTouchEvent(ev);
    }
}
